package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 系统参数表,存放经销商自定义参数，如技师、自定义类别
 * </p>
 *
 * @author 李贺
 * @since 2019-09-18
 */
@TableName("tc_system_param")
public class SystemParamPO extends DMSBasePO<SystemParamPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 参数ID
     */
        @TableId(value = "PARAM_ID", type = IdType.AUTO)
        private Long paramId;
    /**
     * APP_ID
     */
    @TableField("APP_ID")
    private String appId;
    /**
     * OWNER_CODE
     */
    @TableField("COMPANY_ID")
    private Long companyId;
    /**
     * 参数类型
     */
    @TableField("PARAM_TYPE")
    private Integer paramType;
    /**
     * 参数CODE
     */
    @TableField("PARAM_CODE")
    private String paramCode;
    /**
     * 参数名称
     */
    @TableField("PARAM_NAME")
    private String paramName;
    /**
     * 状态(10011001有效,10011002无效)
     */
    @TableField("STATUS")
    private Integer status;
    /**
     * 参数值
     */
    @TableField("PARAM_VALUE")
    private String paramValue;
    /**
     * 维修，配件、通用
     */
    @TableField("PARAM_CATEGORY")
    private Integer paramCategory;
    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;
    /**
     * 逻辑删除标志：是否删除
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public SystemParamPO() {
        super();
    }


    public Long getParamId() {
        return paramId;
    }

    public void setParamId(Long paramId) {
        this.paramId = paramId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Integer getParamType() {
        return paramType;
    }

    public void setParamType(Integer paramType) {
        this.paramType = paramType;
    }

    public String getParamCode() {
        return paramCode;
    }

    public void setParamCode(String paramCode) {
        this.paramCode = paramCode;
    }

    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getParamValue() {
        return paramValue;
    }

    public void setParamValue(String paramValue) {
        this.paramValue = paramValue;
    }

    public Integer getParamCategory() {
        return paramCategory;
    }

    public void setParamCategory(Integer paramCategory) {
        this.paramCategory = paramCategory;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    @Override
    protected Serializable pkVal() {
        return this.paramId;
    }

    @Override
    public String toString() {
        return "SystemParamPO{" +
                "paramId=" + paramId +
                ", appId='" + appId + '\'' +
                ", companyId=" + companyId +
                ", paramType=" + paramType +
                ", paramCode='" + paramCode + '\'' +
                ", paramName='" + paramName + '\'' +
                ", status=" + status +
                ", paramValue='" + paramValue + '\'' +
                ", paramCategory=" + paramCategory +
                ", remark='" + remark + '\'' +
                ", isDeleted=" + isDeleted +
                '}';
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author 李贺
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "paramId");
    }


}
